﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Aquasoft.Iszr.Proxy.WebServices.Types
{
    public class AifoType
    {
        private byte[] data;

        public AifoType(byte[] iszrAifo)
        {
            if (iszrAifo.Length != 17)
                throw new ArgumentException("Invalid AIFO");
            this.data = iszrAifo;
        }

        public string AsBase64String 
        { 
            get { return Convert.ToBase64String(data); }
            set { data = Convert.FromBase64String(value); }
        }

        public override string ToString()
        {
            return "AIFO:" + AsBase64String;
        }
    }
}
